package com.study.mapper;

import com.study.domain.UserLogin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserRepository {

    //这里为什么不写 and password=???呢，是因为Security自动帮我们检查密码，而不需要我们手动写sql了
    @Select("select * from user_login where username=#{username} ")
    public UserLogin findOneByLogin(@Param("username") String  username);

}
